home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / DISKS / Issue24 / survive / UBASE.PAS < prev   
Encoding:
Pascal/Delphi Source File  |  1997-06-22  |  415 b   |  26 lines

  1. unit uBase;
  2.  
  3. interface
  4.  
  5. uses
  6.   Classes;
  7.  
  8. const
  9.   mskCurrency = '%.0m';   { whole unit currency }
  10.  
  11. function GetCellAmount(aValue: string): LongInt;
  12.  
  13. implementation
  14.  
  15. function GetCellAmount(aValue: string): LongInt;
  16. var
  17.   I: Integer;
  18. begin
  19.   Result := 0;
  20.   for I := 1 to Length(aValue) do
  21.     if aValue[I] in ['0'..'9'] then
  22.       Result := Result * 10 + Ord(aValue[I]) - Ord('0');
  23. end;
  24.  
  25. end.
  26.